﻿@using GravatarHelper.Extensions

<div class="pull-right">
    @if (Request.IsAuthenticated)
    {
        <a href="@Url.Action("Manage", "Account")" class="pull-left">
           @* <div class="user-info-block">
                <h4>@User.Identity.Name</h4>
            </div>
            <div class="user-info-block">
              <i class="icon-user icon-3x"></i>*@
                @Html.Gravatar(User.Identity.Name, 40, "identicon" , new { Title = User.Identity.Name, Alt = User.Identity.Name })
              @*</div>*@
        </a>
        using (Html.BeginForm("LogOff", "Account", FormMethod.Post, new { id = "logoutForm" }))
        {
        @Html.AntiForgeryToken()
        <a href="javascript:document.getElementById('logoutForm').submit()" class="pull-left">
            <div class="user-info-block">
                <i class="icon-signout icon-3x"></i>
            </div>
        </a>
        }

    }
    else
    {
        <ul class="inline">
            <li><a href="@Url.Action("Register", "Account", new { area = "" })" id="registerLink"><i class="icon-3x icon-user"></i></a></li>
            <li><a href="@Url.Action("Login", "Account", new { area = "" })" id="loginLink"><i class="icon-3x icon-signin"></i></a></li>
        </ul>
    }
</div>
